Teaching How to Derive Correct Concurrent Programs from State-Based Specifications and Code Patterns
نویسندگان
چکیده
The fun of teaching and learning concurrent programming is sometimes darkened by the difficulty in getting concurrent programs to work right. In line with other programming subjects in our department, we advocate the use of formal specifications to state clearly how a concurrent program must behave, to reason about this behavior, and to be able to produce code from specifications in a semi-automatic fashion. We argue that a mild form of specification not only makes it possible to get programs running easier, but it also introduces students to a quite systematic way of approaching programming: reading and understanding specifications is seen as an unavoidable step in the programming process, as they are really the only place where the expected conduct of the system is described. By using formal techniques in these cases, where they are undoubtedly appropriate, we introduce formality without the need to resort to justifications with artificial or overly complicated examples.
منابع مشابه
Compositional Abstraction for Concurrent Programs
We present a methodology for automatically constructing an abstraction of concurrent programs against safety specifications based on finite state machine. And then automatically extract an initial abstract model from source code using predicate abstraction and theorem proving. However, the process of extracting a finite model from a program using predicate abstraction can be exponential in the ...
متن کاملSynthesis of Concurrent Programs Based on Supervisory Control
This document describes an application of the supervisory control (SC) methods to the synthesis of concurrent programs and presents current work on this topic of research. In particular, special attention is given to the development of software that applies SC to program synthesis. This work is motivated by the difficulties encountered in writing correct programs in the context of concurrency. ...
متن کاملA History of BlockingQueues
This paper describes a way to formally specify the behaviour of concurrent data structures. When specifying concurrent data structures, the main challenge is to make specifications stable, i.e., to ensure that they cannot be invalidated by other threads. To this end, we propose to use history-based specifications: instead of describing method behaviour in terms of the object’s state, we specify...
متن کاملTeaching Methods and Tools Used In Food Safety Extension Education Programs in the North Central Region of the United States
One of the ways to ensure food safety is to educate the public. Of the organizations providing food safety education in the United States (U.S.), the Cooperative Extension System (CES) is one of the most reliable. The effectiveness CES programs depends not only on what is being taught but also on how it is taught. Both a needs-based curriculum and how that curriculum is delivered are equally im...
متن کاملState-expansion-based techniques for synthesizing concurrent protocol specifications in distributed systems
Several methods have been proposed for synthesizing communication protocol specifications starting from given service specifications. Due to the inherently sequential nature of a finite state machine (FSM), some FSM-based protocol synthesis methods assume that primitives in the service specifications cannot be executed simultaneously. However, other synthesis methods were introduced to handle c...
متن کامل